package org.blogwu.learn.designpattern.chapter16.v1;

public class OrderServiceImpl implements IOrderService {

    private IOrderDao iOrderDao;

    @Override
    public int saveOrder(Order order) {
        // Spring是自动注入，案例就自己new。
        iOrderDao = new OrderDapImpl();
        System.out.println("service 层调用Dao层添加Order");
        return iOrderDao.insert(order);
    }
}
